import { NgModule, ErrorHandler } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { IonicApp, IonicModule, IonicErrorHandler, PopoverController } from 'ionic-angular';
import { MyApp } from './app.component';

import { AboutPage } from '../pages/about/about';
import { ContactPage } from '../pages/contact/contact';
import { HomePage } from '../pages/home/home';
import { TabsPage } from '../pages/tabs/tabs';
import { LoginPage } from '../pages/login/login';
import { MainPage } from '../pages/main/main';
import {DatePipe} from "@angular/common";
import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';
import { JoinPage } from '../pages/join/join';
import { ApiProvider } from '../providers/api/api';
import { HttpClient, HttpClientModule } from "@angular/common/http";
import { SignUpPage } from "../pages/sign-up/sign-up";
import { ExercisesPage } from "../pages/exercises/exercises";
import { ResoursePage } from "../pages/resourse/resourse"
import { AllCoursePage } from "../pages/all-course/all-course";
import { MessagePage } from "../pages/message/message";
import { Uid } from "@ionic-native/uid";
import { AndroidPermissions } from "@ionic-native/android-permissions";
import { Device } from "@ionic-native/device";
import { Hotspot } from "@ionic-native/hotspot";
import { LocalStorProvider } from '../providers/local-stor/local-stor';
import { IonicStorageModule } from '@ionic/storage';
import { JoinCourseDetailPage } from "../pages/join-course-detail/join-course-detail";
import { CourseDetailPage } from "../pages/course-detail/course-detail";
import { UnitListPage } from "../pages/unit-list/unit-list";
import { RegisterPage } from "../pages/register/register";
import { ForgetPasswordPage } from "../pages/forget-password/forget-password";
import { SearchPage } from "../pages/search/search";
import { UnitCourseInfoPage } from "../pages/unit-course-info/unit-course-info";
import { PersonalCentrePage } from "../pages/personal-centre/personal-centre";
import { TeachingPage } from "../pages/teaching/teaching";
import { TeachSignPage } from "../pages/teach-sign/teach-sign";
import { BarragePage } from "../pages/barrage/barrage";
import { TeacheraddClassPage } from "../pages/teacheradd-class/teacheradd-class";
import { RandomCallPage } from "../pages/random-call/random-call";
import { UpdatePasswordPage } from "../pages/update-password/update-password";
import { AppVersion } from "@ionic-native/app-version";
import { UpgradeAppProvider } from '../providers/upgrade-app/upgrade-app';
import { File } from "@ionic-native/file";
import { FileTransfer, FileTransferObject } from "@ionic-native/file-transfer";
import { FileOpener } from '@ionic-native/file-opener';
import { InAppBrowser } from '@ionic-native/in-app-browser';
import { UnitSourceListPage } from "../pages/unit-source-list/unit-source-list";
import { SourceViewProvider } from '../providers/source-view/source-view';
import { MyScoreListPage } from '../pages/my-score-list/my-score-list';
import { PersonRankingPage } from "../pages/person-ranking/person-ranking";
import { AllRankingPage } from "../pages/all-ranking/all-ranking";
import { ThemeableBrowser } from "@ionic-native/themeable-browser";
import { StreamingMedia } from "@ionic-native/streaming-media";
import { BackButtonProvider } from '../providers/back-button/back-button';
import { ViewSourcePage } from "../pages/view-source/view-source";
import { Camera } from '@ionic-native/camera';
import { ExerciseAnswerPage } from "../pages/exercise-answer/exercise-answer";
import { ImagePicker } from "@ionic-native/image-picker";
import { ImgUploadProvider } from "../providers/img-upload/img-upload";
import { Base64 } from "@ionic-native/base64";
import { NgxEchartsModule, NgxEchartsService } from "ngx-echarts";
import { JPushService } from "ionic2-jpush";
import { ComponentsModule } from "../components/components.module";
import { SpeechRecognition } from "@ionic-native/speech-recognition";
import { DirectivesModule } from "../directives/directives.module";
import { MySignListPage } from "../pages/my-sign-list/my-sign-list";
import { CalendarModule } from "ion2-calendar";
import { Media } from "@ionic-native/media";
import { RecordProvider } from '../providers/record/record';
import { FaceProvider } from '../providers/face/face';

import { enableProdMode } from '@angular/core';
import { JPush } from "@jiguang-ionic/jpush";
import { CreateBullentPage } from "../pages/create-bullent/create-bullent";
import { StudentAddPage } from "../pages/student-add/student-add";
enableProdMode();
@NgModule({
  declarations: [
    MyApp,
    AboutPage,
    ContactPage,
    HomePage,
    TabsPage,
    LoginPage,
    MainPage,
    RandomCallPage,
    JoinPage,
    SignUpPage,
    ExercisesPage,
    ResoursePage,
    AllCoursePage,
    MessagePage,
    JoinCourseDetailPage,
    CourseDetailPage,
    UnitListPage,
    RegisterPage,
    ForgetPasswordPage,
    TeacheraddClassPage,
    SearchPage,
    UnitCourseInfoPage,
    PersonalCentrePage,
    TeachingPage,
    TeachSignPage,
    BarragePage,
    UpdatePasswordPage,
    UnitSourceListPage,
    MyScoreListPage,
    PersonRankingPage,
    AllRankingPage,
    ViewSourcePage,
    ExerciseAnswerPage,
    MySignListPage,
    CreateBullentPage,
    StudentAddPage
  ],
  imports: [
    BrowserModule,
    HttpClientModule,
    NgxEchartsModule,
    IonicModule.forRoot(MyApp, { backButtonText: "返回", mode: 'ios' }),
    IonicStorageModule.forRoot(),
    ComponentsModule,
    DirectivesModule,
    CalendarModule
  ],
  bootstrap: [IonicApp],
  entryComponents: [
    MyApp,
    AboutPage,
    ContactPage,
    HomePage,
    TabsPage,
    LoginPage,
    MainPage,
    JoinPage,
    SignUpPage,
    ExercisesPage,
    ResoursePage,
    AllCoursePage,
    MessagePage,
    JoinCourseDetailPage,
    CourseDetailPage,
    UnitListPage,
    RegisterPage,
    ForgetPasswordPage,
    SearchPage,
    UnitCourseInfoPage,
    PersonalCentrePage,
    TeachingPage,
    TeachSignPage,
    BarragePage,
    UpdatePasswordPage,
    UnitSourceListPage,
    MyScoreListPage,
    TeacheraddClassPage,
    PersonRankingPage,
    AllRankingPage,
    ViewSourcePage,
    ExerciseAnswerPage,
    MySignListPage,
    CreateBullentPage,
    RandomCallPage,
    StudentAddPage
  ],
  providers: [
    DatePipe,
    HttpClient,
    StatusBar,
    SplashScreen,
    { provide: ErrorHandler, useClass: IonicErrorHandler },
    ApiProvider,
    Uid,
    AndroidPermissions,
    Hotspot,
    Device,
    LocalStorProvider,
    AppVersion,
    UpgradeAppProvider,
    File,
    FileTransfer,
    FileTransferObject,
    FileOpener,
    InAppBrowser,
    SourceViewProvider,
    ThemeableBrowser,
    StreamingMedia,
    BackButtonProvider,
    Camera,
    ImagePicker,
    ImgUploadProvider,
    Base64,
    NgxEchartsService,
    JPush,
    JPushService,
    NgxEchartsService,
    PopoverController,
    SpeechRecognition,
    Media,
    RecordProvider,
    FaceProvider
  ]
})
export class AppModule { }
